<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- saved from url=(0014)about:internet -->
<html xmlns:MSHelp="http://www.microsoft.com/MSHelp/" lang="en-us" xml:lang="en-us"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta name="DC.Type" content="reference">
<meta name="DC.Title" content="spin_mutex Class">
<meta name="DC.subject" content="spin_mutex Class">
<meta name="keywords" content="spin_mutex Class">
<meta name="DC.Relation" scheme="URI" content="../../../reference/synchronization/mutexes.htm">
<meta name="DC.Relation" scheme="URI" content="mutex_concept.htm">
<meta name="DC.Format" content="XHTML">
<meta name="DC.Identifier" content="spin_mutex_cls">
<meta name="DC.Language" content="en-US">
<link rel="stylesheet" type="text/css" href="../../../intel_css_styles.css">
<title>spin_mutex Class</title>
</head>
<body id="spin_mutex_cls">
 <!-- ==============(Start:NavScript)================= -->
 <script src="..\..\..\NavScript.js" language="JavaScript1.2" type="text/javascript"></script>
 <script language="JavaScript1.2" type="text/javascript">WriteNavLink(3);</script>
 <!-- ==============(End:NavScript)================= -->
<a name="spin_mutex_cls"><!-- --></a>


    <h1 class="topictitle1">spin_mutex Class</h1>

    
<div>
        <div class="section"><h2 class="sectiontitle"> spin_mutex Class</h2>
            <p><strong>Summary</strong></p>

            <p>Class that models Mutex Concept using a spin lock.</p>

            </div>
<div class="section"><h2 class="sectiontitle">Syntax</h2>
            <pre>class spin_mutex;</pre>
            </div>
<div class="section"><h2 class="sectiontitle">Header</h2>
            <pre>#include "tbb/spin_mutex.h"</pre>
            </div>
<div class="section"><h2 class="sectiontitle">Description</h2>
            <p>A <samp class="codeph">spin_mutex</samp> models the Mutex Concept. A <samp class="codeph">spin_mutex</samp> is not scalable, fair, or recursive. It is ideal when the lock is lightly contended and is held for only a few machine instructions. If a thread has to wait to acquire a <samp class="codeph">spin_mutex</samp>, it busy waits, which can degrade system performance if the wait is long. However, if the wait is typically short, a <samp class="codeph">spin_mutex</samp> significantly improve performance compared to other mutexes.</p>

            </div>
<div class="section"><h2 class="sectiontitle">Members</h2>
            <p>See Mutex Concept.</p>
</div>
    
        
    </div>
 
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong>&nbsp;<a href="../../../reference/synchronization/mutexes.htm">Mutexes</a></div>
</div>
<div class="See Also">
<h2>See Also</h2>
<div class="linklist">
<div><a href="mutex_concept.htm">Mutext Concept</a></div></div>
</div>
</body>
</html>
